#include "Win32_PCH.h"
#include "Win32Window.h"


CWin32Window::CWin32Window( HWND hWnd, LPCTSTR szName )
	: m_hWnd(hWnd)
	, m_szName(szName)
{
	// save window size
	RECT windowSize;
	GetClientRect( hWnd, &windowSize );
	m_iWidth = windowSize.right;
	m_iHeight = windowSize.bottom;
}

CWin32Window::~CWin32Window(void)
{
	m_hWnd = NULL;
	//PostQuitMessage(0);
}

LRESULT CWin32Window::WndProc( HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam ) {
/*
	HDC hdc;
	PAINTSTRUCT ps;
	switch(iMessage) {
	case WM_CREATE:
		return 0;
	case WM_PAINT:
		hdc=BeginPaint(hWnd, &ps);
		EndPaint(hWnd, &ps);
		return 0;
	case WM_DESTROY:
		PostQuitMessage(0);
		return 0;
	}
*/
	return (DefWindowProc(hWnd,iMessage,wParam,lParam));
}